
<%@ page import="sushidiscount.Discount" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="sushiheader" />
        <g:set var="entityName" value="${message(code: 'discount.label', default: 'Discount')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list">Lista de Descuentos</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">Agregar Descuento</g:link></span>
        </div>
        <div class="body">
            <h1>Detalles</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="dialog">


            <sec:ifLoggedIn>
                <rateable:resources/><rateable:ratings bean='${discountInstance}'/>
                <br/>

            </sec:ifLoggedIn>
                <table>
                    <tbody>
                                        
                        <tr class="prop">
                            <td valign="top" class="name">Local</td>
                            
                            <td valign="top" class="value"><g:link controller="sushiPlace" action="show" id="${discountInstance?.sushiplace?.id}">${discountInstance?.sushiplace?.encodeAsHTML()}</g:link></td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Porcentaje</td>
                            
                            <td valign="top" class="value">${fieldValue(bean: discountInstance, field: "percentage")}&#37</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Forma de Pago</td>
                            
                            <td valign="top" class="value">${fieldValue(bean: discountInstance, field: "payform")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Club Socio</td>
                            
                            <td valign="top" class="value">${fieldValue(bean: discountInstance, field: "membership")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Aplicable sobre</td>
                            
                            <td valign="top" class="value">${fieldValue(bean: discountInstance, field: "aplicable")}</td>
                            
                        </tr>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Despacho</td>
                            
                            <td valign="top" class="value">${fieldValue(bean: discountInstance, field: "delivery")}</td>
                            
                        </tr>
                             
                    </tbody>
                </table>
                <br/>
                <table>
                    <tbody>
                        <tr class="prop">
                            <td valign="top" class="name">Lunes</td>
                            <td valign="top" class="name">Martes</td>
                            <td valign="top" class="name">Miércoles</td>
                            <td valign="top" class="name">Jueves</td>
                            <td valign="top" class="name">Viernes</td>
                            <td valign="top" class="name">Sábado</td>
                            <td valign="top" class="name">Domingo</td>
                                                        
                        </tr>
                    
                        <tr class="prop">

                            <g:if test="${discountInstance?.monday}">
                                <td valign="top" class="validDay">Sí</td>
                            </g:if>
                            <g:else>
                                <td valign="top" class="invalidDay">No</td>
                            </g:else>

                            <g:if test="${discountInstance?.tuesday}">
                                <td valign="top" class="validDay">Sí</td>
                            </g:if>
                            <g:else>
                                <td valign="top" class="invalidDay">No</td>
                            </g:else>

                            <g:if test="${discountInstance?.wednesday}">
                                <td valign="top" class="validDay">Sí</td>
                            </g:if>
                            <g:else>
                                <td valign="top" class="invalidDay">No</td>
                            </g:else>

                            <g:if test="${discountInstance?.thursday}">
                                <td valign="top" class="validDay">Sí</td>
                            </g:if>
                            <g:else>
                                <td valign="top" class="invalidDay">No</td>
                            </g:else>

                            <g:if test="${discountInstance?.friday}">
                                <td valign="top" class="validDay">Sí</td>
                            </g:if>
                            <g:else>
                                <td valign="top" class="invalidDay">No</td>
                            </g:else>

                            <g:if test="${discountInstance?.saturday}">
                                <td valign="top" class="validDay">Sí</td>
                            </g:if>
                            <g:else>
                                <td valign="top" class="invalidDay">No</td>
                            </g:else>

                            <g:if test="${discountInstance?.sunday}">
                                <td valign="top" class="validDay">Sí</td>
                            </g:if>
                            <g:else>
                                <td valign="top" class="invalidDay">No</td>
                            </g:else>

                        </tr>
                                 
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${discountInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="Editar" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="Eliminar" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </g:form>
            </div>
        </div>

        <g:render template="/footer" />
        <style type="text/css" media="screen">
            #footer
            {
                background-image: url(../../images/skin/light.png);
                background-repeat: repeat-x;
            }
        </style>
    </body>
</html>
